package com.fengr.org.controller;

import com.fengr.org.domain.Employee;
import com.fengr.org.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/emp")
public class EmployeeController {
    @Autowired
    private IEmployeeService employeeService;
    @GetMapping
    public List<Employee> loadAll(){
        return employeeService.loadAll();
    }
}